// 项目
import request from '@/utils/request'

let BASE_ADDRESS = '/doc/project'

// 获取项目信息 /financial/projectPrice/selectByType/{typeId}
export const getProjectPriceSelectByTypeApi = (typeId) =>{
    return request({
        url: `/financial/projectPrice/selectByType/${typeId}`,
        method: "get",
    })
}

// 项目下单 /doc/project/add
export const addProjectApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: 'post',
        data
    })
}

//查订单id /financial/order/getById
export const getOrderByIdApi = (params) =>{
    return request({
        url: `/financial/order/getById`,
        method: "get",
        params
    })
}

//获取项目信息 /doc/project/getInfo
export const getProjectGetInfoApi = (params) =>{
    return request({
        url: `${BASE_ADDRESS}/getInfo`,
        method: 'get',
        params
    })
}

// 项目修改 /doc/project/edit
export const editProjectApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: 'put',
        data
    })
}

// 上传项目材料  /doc/project/uploadProjectMaterials
export const uploadProjectMaterialsApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/uploadProjectMaterials`,
        method: 'post',
        data
    })
}

// 根据id查协议  /doc/richText/list
export const getRichTextListApi = (params) =>{
    return request({
        url: `/doc/richText/list`,
        method: 'get',
        params
    })
}
